import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    num:10,
    playlist:[],
    playing:false,
    currentIndex:-1
  },
  mutations: {
    setNum(state,val){
      state.num += val
    },
    setPlaylist(state,arr){
      state.playlist=arr
    },
    setPlaying(state,val){
      state.playing=val
    },
    setCurrentIndex(state,i){
      state.currentIndex=i
    }
  },
  actions: {
  },
  modules: {
  }
})
